package com.wing.order.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.wing.order.model.entity.OrderDeliveryDetail;
import com.wing.order.model.response.OrderDeliveryDetailVO;
import com.wing.order.model.response.ScanDeliveryVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * 配送明细-Dao
 *
 * @author
 */
@Mapper
public interface OrderDeliveryDetailDao extends BaseMapper<OrderDeliveryDetail> {

    /**
     * 列表-app
     *
     * @param params
     *
     * @return
     */
    List<OrderDeliveryDetailVO> list4app(@Param("params") Map<String, Object> params);

    /**
     * 分页列表-app
     *
     * @param page
     * @param params
     *
     * @return
     */
    List<OrderDeliveryDetailVO> list4app(@Param("page") Page<OrderDeliveryDetailVO> page, @Param("params") Map<String, Object> params);

    /**
     * 详情-app
     *
     * @param id
     *
     * @return
     */
    OrderDeliveryDetailVO get4appById(Long id);

    /**
     * 签收明细
     */
    List<OrderDeliveryDetailVO>signDetail(@Param("skuCode") String skuCode);


    /**
     * 添加签收信息
     */
    ScanDeliveryVo scanPickupInfo(@Param("packLabelCode")String packLabelCode, @Param("deliveryOrderCode")String deliveryOrderCode);

    Integer countNotFinish(Long deliveryDetailId);

}
